<div>
  <h2>
    文章
    <small ng-if="id">修改</small>
    <small ng-if="!id">添加</small>
  </h2>
</div>
<form class="form-horizontal" name="form" role="form" ng-submit="set()">
  <div class="form-group">
    <label for="title" class="col-sm-1 control-label">标题</label>
    <div class="col-sm-5">
      <input type="text" class="form-control" id="title" placeholder="请输入标题" required="required" ng-model="vm.article.title">
    </div>
  </div>
  <div class="form-group">
    <label for="category" class="col-sm-1 control-label">栏目</label>
    <div class="col-sm-5">
      <select class="form-control" id="category" ng-model="vm.article.CategoryId" required="required" ngcloak>
        <option ng-repeat="category in vm.categorys track by $index" value="{{category.id}}" ng-selected="category.id === vm.article.CategoryId">{{category.name}}</option>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label for="delivertime" class="col-sm-1 control-label">发表时间</label>
    <div class="col-sm-5">
      <div class="input-group">
        <input class="form-control" type="text" id="delivertime" placeholder="发表时间" required="required" ng-model="vm.article.deliverTime" uib-datepicker-popup="yyyy-MM-dd HH:mm:ss" is-open="open">
        <span class="input-group-btn">
        <button type="button" ng-click="open=true" class="btn btn-info">
            <i class="glyphicon glyphicon-calendar"></i>
        </button>
      </span>
      </div>
    </div>
  </div>
  <div class="form-group">
    <label for="keyword" class="col-sm-1 control-label">关键字</label>
    <div class="col-sm-5">
      <input type="text" class="form-control" id="keyword" placeholder="关键字" ng-model="vm.article.keyword">
    </div>
  </div>
  <div class="form-group">
    <label for="summary" class="col-sm-1 control-label">摘要</label>
    <div class="col-sm-11">
      <!-- <textarea class="form-control" id="summary" placeholder="摘要" required="required" ng-model="vm.article.summary" rows="8"></textarea> -->
      <textarea ueditor id="summary" ng-model="vm.article.summary" required="required" rows="20"></textarea>
    </div>
  </div>
  <div class="form-group">
    <label for="content" class="col-sm-1 control-label">正文</label>
    <div class="col-sm-11">
      <textarea ueditor id="content" ng-model="vm.article.content" required="required" rows="20"></textarea>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-1 col-sm-3">
      <button type="submit" class="btn btn-success" ng-class="">确定</button>
      <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
    </div>
  </div>
</form>
